package com.team.arms.yuding.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.team.arms.yuding.domain.VoluntaryInformation;
import com.team.arms.yuding.domain.dto.VoluntaryInformationDto;
import com.team.arms.yuding.domain.vo.VoluntaryInformationVo;
import com.team.arms.yuding.mapper.VoluntaryInformationMapper;
import com.team.arms.yuding.service.VoluntaryInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 */
@Service
public class VoluntaryInformationServiceImpl extends ServiceImpl<VoluntaryInformationMapper, VoluntaryInformation>
    implements VoluntaryInformationService {

    @Autowired
    private VoluntaryInformationMapper voluntaryInformationMapper;

    /**
     * 查询志愿填报信息
     * @return
     */
    @Override
    public List<VoluntaryInformationVo> selectList() {
        return voluntaryInformationMapper.selectAll();
    }

//    @Override
//    public List<VoluntaryInformationVo> selectByName(@Param("name") String name) {
//        return baseMapper.selectByname(name);
//    }

    @Override
    public List<VoluntaryInformationVo> selectVoluntaryInformation(VoluntaryInformationDto voluntaryInformationDto) {
        return voluntaryInformationMapper.selectVoluntaryInformationVo(voluntaryInformationDto);
    }




    /**
     * 增加志愿填报信息
     * @param voluntaryInformation
     * @return
     */
    @Override
    public int insertAll(VoluntaryInformation voluntaryInformation) {
        return voluntaryInformationMapper.insert(voluntaryInformation);
    }


    /**
     *
     * @param volunteerInfoId
     * @return
     */
    @Override
    public VoluntaryInformationVo selectById(String volunteerInfoId) {
        return voluntaryInformationMapper.selectById(volunteerInfoId);
    }

    @Override
    public List<String> selectCultureProgramByVolunteerOne(String volunteerOne) {
        return voluntaryInformationMapper.selectCultureProgramByVolunteerOne(volunteerOne);
    }


}




